/**
 * @file hsystem_api.h
 * @brief HalOS System API
 * @author Team Halos
 * @version 0.0.1
 * @date 2008-2009
 * @note Hardware: NGW100, Software: AVR32-GCC
 * @license LGPLv2.1
 */

/**
 *  @defgroup API Halos API's
 */

/**
 *  @defgroup SYSTEM_CALL_API System Call API
 *  @ingroup API
 */

/**
 *  @defgroup SYSTEM_CALL_TABLE System Call Table
 *  @ingroup SYSTEM_CALL_API
 *  @brief System Call TABLE manages all system calls from usermode to halOS (supervisormode)
 *  @note ...
 *  @author giaco, momo
 *  @version 0.0.1
 */

/**@{*/

#ifndef _SYSTEM_CALL_TABLE_H_
#define _SYSTEM_CALL_TABLE_H_

#ifdef __cplusplus
extern "C" {
#endif

//TODO rearagne syscall numbers
#define SCALL_DEVICE_INIT      			1
#define SCALL_DEVICE_OPEN     			SCALL_DEVICE_INIT+1
#define SCALL_DEVICE_CLOSE   		  	SCALL_DEVICE_INIT+2
#define SCALL_DEVICE_WRITE				SCALL_DEVICE_INIT+3
#define SCALL_DEVICE_READ		     	SCALL_DEVICE_INIT+4
#define SCALL_RM_DEVICE_OPEN     		SCALL_DEVICE_INIT+5 /** For Ressource Manager */
#define SCALL_RM_DEVICE_CLOSE   		SCALL_DEVICE_INIT+6 /** For Ressource Manager */
#define SCALL_RM_DEVICE_WRITE			SCALL_DEVICE_INIT+7 /** For Ressource Manager */
#define SCALL_RM_DEVICE_READ		    SCALL_DEVICE_INIT+8 /** For Ressource Manager */


/*
 * GDI
 */
#define SCALL_GDI_OPEN					SCALL_DEVICE_INIT+20
#define SCALL_GDI_GOTOXY				SCALL_DEVICE_INIT+21
#define SCALL_GDI_SET_X					SCALL_DEVICE_INIT+22
#define SCALL_GDI_GET_X					SCALL_DEVICE_INIT+23
#define SCALL_GDI_SET_Y					SCALL_DEVICE_INIT+24
#define SCALL_GDI_GET_Y					SCALL_DEVICE_INIT+25
#define SCALL_GDI_GET_SCREENWIDTH		SCALL_DEVICE_INIT+26
#define SCALL_GDI_GET_SCREENHEIGHT		SCALL_DEVICE_INIT+27
#define SCALL_GDI_CLR_SCR				SCALL_DEVICE_INIT+28
#define SCALL_GDI_SET_COLOR				SCALL_DEVICE_INIT+29
#define SCALL_GDI_GET_COLOR				SCALL_DEVICE_INIT+30
#define SCALL_GDI_SET_BG_COLOR			SCALL_DEVICE_INIT+31
#define SCALL_GDI_GET_BG_COLOR			SCALL_DEVICE_INIT+32
#define SCALL_GDI_PUT_PIXEL				SCALL_DEVICE_INIT+33
#define SCALL_GDI_CLR_PIXEL				SCALL_DEVICE_INIT+34
#define SCALL_GDI_VPAN					SCALL_DEVICE_INIT+35
#define SCALL_GDI_DRAW_LINE 			SCALL_DEVICE_INIT+37
#define SCALL_GDI_DRAW_RECTANGLE		SCALL_DEVICE_INIT+38
#define SCALL_GDI_DRAW_CIRCLE			SCALL_DEVICE_INIT+39
#define SCALL_GDI_DRAW_SPRITE			SCALL_DEVICE_INIT+40
#define SCALL_GDI_DRAW_SPRITE_2			SCALL_DEVICE_INIT+41
#define SCALL_GDI_DRAW_COLOR_SPRITE		SCALL_DEVICE_INIT+42
#define SCALL_GDI_FILL_RECTANGLE		SCALL_DEVICE_INIT+43
#define SCALL_GDI_SET_LINETHICKNESS		SCALL_DEVICE_INIT+44
#define SCALL_GDI_SET_LINESTYLE			SCALL_DEVICE_INIT+45

#define SCALL_RM_GDI_OPEN				SCALL_DEVICE_INIT+46 /** Ressource Manager */

/*
 * GDI - FONTS
 */
#define SCALL_GDI_FONT_SELECT				SCALL_DEVICE_INIT+60
#define SCALL_GDI_FONT_PUTCHAR				SCALL_DEVICE_INIT+61
#define SCALL_GDI_FONT_PUTSTRING			SCALL_DEVICE_INIT+62
#define SCALL_GDI_FONT_SETTEXTJUSTIFY		SCALL_DEVICE_INIT+63
#define SCALL_GDI_FONT_GETCHARWIDTH			SCALL_DEVICE_INIT+64
#define SCALL_GDI_FONT_GETSTRINGWIDTH		SCALL_DEVICE_INIT+65
#define SCALL_GDI_FONT_GETFONTHEIGHT		SCALL_DEVICE_INIT+66
/*
 * Halos - SYSTEM - CALLS
 */
#define SCALL_START_PROCESS					SCALL_DEVICE_INIT+80
#define SCALL_NR_PROCESSES					SCALL_DEVICE_INIT+81
#define SCALL_SHOW_PROCESSES				SCALL_DEVICE_INIT+82
#define SCALL_KILL_RUNNING_PROCESS			SCALL_DEVICE_INIT+83
#define SCALL_SYSTEM_TIME					SCALL_DEVICE_INIT+84
#define SCALL_KILL_PROCESS					SCALL_DEVICE_INIT+85

/*
 *  Halos - Memory Heap - CALLS
 */
#define ALLOCATE_IN_PROCESS_REGION_TABLE	SCALL_DEVICE_INIT+90
#define FREE_IN_PROCESS_REGION_TABLE		SCALL_DEVICE_INIT+91


#ifdef __cplusplus
} /* closing brace for extern "C" */
#endif

/**@}*/

#endif //_SYSTEM_CALL_TABLE_H_

